package com.uday.myworld;

import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.TextView;

public class view extends Activity {
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.view);        
        ArrayList<String> full_lv_arr = new ArrayList<String>();
        
        TextView tv = (TextView) findViewById(R.id.t_loc); 
        TextView info = (TextView) findViewById(R.id.infotext);  
        TextView address = (TextView) findViewById(R.id.addresstext);  
        
        tv.setText(getIntent().getExtras().getString("location").toString());        
        int position= (int) getIntent().getExtras().getInt("position");
        full_lv_arr = getIntent().getExtras().getStringArrayList("Flist");
        
        info .setText(full_lv_arr.get((position*3)+1));
        address .setText(full_lv_arr.get((position*3)+2));
        
        
       
        
    }
	
	 
    @Override
	public boolean onCreateOptionsMenu(Menu menu) {
		MenuInflater inflater = getMenuInflater();
		inflater.inflate(R.layout.menu, menu);
		return true;
	}

	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case R.id.exit:
			finishActivity(1);
			return true;
		default:
			return super.onOptionsItemSelected(item);
		}
	}
}
